import { createApp, h } from "vue";

import App from "./App.vue";

import { createWebHashHistory, createRouter } from "vue-router";

import Home from "./views/Home.vue";
import Shop from "./views/Shop.vue";
import Cart from "./views/Cart.vue";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    { path: "/home", component: Home },
    // /shop/1
    // /shop/jack
    { path: "/shop/:ids", component: Shop },
    { path: "/cart/a/b/c", component: Cart },
  ],
});

const app = createApp({ render: () => h(App) });

app.use(router);

app.mount("#app");
